package com.javer.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.javer.dao.CommentDao;
import com.javer.domain.Comment;
import com.javer.domain.PageView;

@Service
public class CommentService {
	@Autowired private CommentDao commentDao;

	public PageView<Comment> getPageByTid(PageView<Comment> pv, int tid, String ctype) {
		pv.setTableName("comment");
		return commentDao.getPageByTid(pv, tid, ctype);
	}
	
	public PageView<Comment> getByPage(PageView<Comment> pv) {
		pv.setTableName("comment");
		return commentDao.getByPage(pv);
	}
	
	public void updateForAgree(Comment c) {
		commentDao.updateCommentForAgree(c);
	}
}
